<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>题库</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.6/semantic.min.css">
    <style>
        .ui.container {
            padding-top: 1.5rem;
        }
        .ui.container[v-cloak] {
            display: none;
        }
    </style>
</head>
<body>
<div class="ui container" id="main" v-cloak>
    <a class="ui green button" href="/manage/question/add">添加题目</a>
    <button type="button" class="ui green button" onclick="a()" style="size: 10rem;">返回首页</button>
    
    <table class="ui celled table" v-if="questions.length>0">
        <thead>
        <tr>
            <th>题目</th>
            <th class="collapsing">类型</th>
        </tr>
        </thead>
        <tbody>
        <tr v-for="question in questions">
            <td>
                <a href="/manage/question/{{question._id}}">{{question.content}}</a>
            </td>
            <td class="collapsing" v-if="question.type==1">单选</td>
            <td class="collapsing" v-if="question.type==2">多选</td>
            <td class="collapsing" v-if="question.type==3">评分</td>
        </tr>
        </tbody>
    </table>
    <div class="ui message" v-else>
        题库中没有题目
    </div>
</div>
<script src="/manage/js/vue.min.js"></script>
<script src="/manage/js/fetch.min.js"></script>
<script src="/manage/js/questions.js"></script>
<script>
function a(){


    window.location.href="/index"
}



</script>
</body>
</html>